﻿@model Solution.Business.Entities.User

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@if(Session["UserName"] == null)
{
using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <table>
        				<tbody>
                        <tr>
                            <td style="padding: 10px 3px 5px 3px; text-align: right">
                                <span id="Username" style="font-family: Arial; font-size: 12px">UserName:</span>
                            </td>
                            <td style="padding-top: 10px; max-width:120px; max-height:19px;">
                                @Html.TextBoxFor(model => model.UserName, String.Empty)
                            </td>
        				</tr>
        				<tr>
            				<td style="padding: 10px 3px 5px 3px; text-align: right">
                                <span id="Password" style="font-family: Arial; font-size: 12px">Password:</span>
                            </td>
                            <td style="padding-top: 10px; width:120px; height:19px;">
                                @Html.PasswordFor(model => model.Password, String.Empty)
                            </td>
                        </tr>
                        <tr>
            				<td>&nbsp;</td>
                            <td style="padding-top: 10px; width:150px;">
                                <input type="submit" value="Log On" id="submitButton" name="submitButton" style="padding: 2px 4px; width:65px; height:25px; font-family:Arial;">
                            	@Html.ActionLink("Register", "Register")
                            </td>
        				</tr>
    					</tbody>
                    </table>
}
}
    else
{
<text>Welcome <b style="color:red;">@Session["UserName"]</b></text> @:[ @Html.ActionLink("Log Out","LogOut","Account")]
}